class Solution {
    public int singleNumber(int[] nums) {
        if(0 == nums.length||null == nums) {
            return -1;
        }
        int num = 0;
        for(int i = 0;i<nums.length;i++) {
            num^=nums[i];
        }
        return num;
    }
}